<?php
/**
*+-------IMBA广告位业务数据的获取操作--------+
*+-------------------------------------------------+
*+-------主要是前台数据操作-------------+
*+-------------------------------------------------+
*+-------广告位业务是基于MongoDB存储的---------------+
*+-------------------------------------------------+
*+-@author susy.liang <liangling@ilongyuan.com.cn>-+
*+-------------------------------------------------+
*/
namespace Common\Service;

Class AdsService extends BaseService
{	
	/*id:键, name:广告位名, code:广告位标识, template:模板, status:广告位状态,
	 create_time:创建时间,update_time：更新时间,
	*/

	/**
	*获取广告位的id
	*@param string $code 广告位标识
	*@return integer
	*/
	public function getAdsId($code="indexBanner"){
		$data = $this->where(array('code'=>(string)$code,))->field('id')->find();
		return $data['id']?intval($data['id']):0;

	}
	

}